package com.mhy.book.app;

import com.mhy.book.mapper.BookMapper;
import com.mhy.book.pojo.CollObject;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class BeanCollectionDIMain {
    public static void main(String[] args) {
        ApplicationContext ioc = new ClassPathXmlApplicationContext("bean_collection_di.xml");
        CollObject collObject = ioc.getBean("collObject", CollObject.class);
        System.out.println(collObject);
        BookMapper bookMapper = collObject.getMapperList().get(0);
        bookMapper.selectById(10);

    }
}
